package com.xilihui.xlh.constant;

import com.xilihui.xlh.BuildConfig;

/**
 * Created by Administrator on 2018/5/16.
 */

public class UrlConst {

    //本地服务器
    private static final String BASE_URL_DEBUG = "http://test.qianruiji.net";
    //    private static final String BASE_URL_DEBUG = "http://192.168.1.188/al1825-yii/api/web/";
    private static final String BASE_HTML_URL_DEBUG = "http://test.qianruiji.net";
    private static final String BASE_IMAGE_URL_DEBUG = "http://test.qianruiji.net";
    //测试服务器
    private static final String BASE_URL_BETA = "http://test.qianruiji.net/";
    private static final String BASE_HTML_URL_BETA = "http://test.qianruiji.net/";
    private static final String BASE_IMAGE_URL_BETA = "http://test.qianruiji.net/";
    //正式服务器 
    private static final String BASE_URL_RELEASE = "https://www.qianruiji.net/";
    private static final String BASE_HTML_URL_RELEASE = "https://www.qianruiji.net/";
    private static final String BASE_IMAGE_URL_RELEASE = "https://www.qianruiji.net/";
    
    public static String baseUrl() {
        switch (BuildConfig.APP_DEBUG) {
            case 0:
                return BASE_URL_DEBUG;
            case 1:
                return BASE_URL_BETA;
            case 2:
                return BASE_URL_RELEASE;
        }
        return null;
    }

    public static String htmlURL() {
        switch (BuildConfig.APP_DEBUG) {
            case 0:
                return BASE_HTML_URL_DEBUG;
            case 1:
                return BASE_HTML_URL_BETA;
            case 2:
                return BASE_HTML_URL_RELEASE;
        }
        return null;
    }

    public static String imageURL() {
        switch (BuildConfig.APP_DEBUG) {
            case 0:
                return BASE_IMAGE_URL_DEBUG;
            case 1:
                return BASE_IMAGE_URL_BETA;
            case 2:
                return BASE_IMAGE_URL_RELEASE;
        }
        return null;
    }

    public static String aliImageUrl() {
        return "http://al1825-img.oss-cn-shenzhen.aliyuncs.com/";
    }
    
}
